import request from '@/utils/request'

// 查询个人合伙人列表
export function listPartner(query) {
  return request({
    url: '/api/partner/individual/list',
    method: 'get',
    params: query
  })
}

// 查询个人合伙人详细
export function getPartner(id) {
  return request({
    url: '/api/partner/individual/' + id,
    method: 'get'
  })
}


export function agreePartner(id) {
  return request({
    url: '/api/partner/individual/agree/'+ id,
    method: 'get'
  })
}

export function refusePartner(id) {
  return request({
    url: '/api/partner/individual/refuse/'+ id,
    method: 'get'
  })
}



// 新增个人合伙人
export function addPartner(data) {
  return request({
    url: '/api/individual/partner',
    method: 'post',
    data: data
  })
}

// 修改个人合伙人
export function updatePartner(data) {
  return request({
    url: '/api/individual/partner',
    method: 'put',
    data: data
  })
}


// 删除个人合伙人
export function delPartner(id) {
  return request({
    url: '/api/partner/individual/' + id,
    method: 'delete'
  })
}
